package com.example.jiankang.pages;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.example.jiankang.Fragment.wodeFragment;
import com.example.jiankang.R;

public class touxiangActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_touxiang);
        ImageView touxiang = findViewById(R.id.image_touxiang);
        ImageView image1 = findViewById(R.id.image_1);
        ImageView image2 = findViewById(R.id.image_2);
        ImageView image3 = findViewById(R.id.image_3);
        ImageView image4 = findViewById(R.id.image_4);
        ImageView image5 = findViewById(R.id.image_5);
        ImageView image6 = findViewById(R.id.image_6);
        image1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                    Intent result = new Intent();
                    result.putExtra("avatar_res_id", R.drawable.image_1);
                    setResult(RESULT_OK, result);
                    finish();
            }
        });
        image2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent result = new Intent();
                result.putExtra("avatar_res_id", R.drawable.image_2);
                setResult(RESULT_OK, result);
                finish();
            }
        });
        image3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent result = new Intent();
                result.putExtra("avatar_res_id", R.drawable.image_3);
                setResult(RESULT_OK, result);
                finish();

            }
        });
        image4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent result = new Intent();
                result.putExtra("avatar_res_id", R.drawable.image_4);
                setResult(RESULT_OK, result);
                finish();

            }
        });
        image5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent result = new Intent();
                result.putExtra("avatar_res_id", R.drawable.image_5);
                setResult(RESULT_OK, result);
                finish();

            }
        });
        image6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent result = new Intent();
                result.putExtra("avatar_res_id", R.drawable.image_6);
                setResult(RESULT_OK, result);
                finish();

            }
        });




    }
}